<template>
  <el-card class="update-log msg-table-list" style="height: 366px;">
    <div slot="header" class="clearfix">
      <span>考试信息（<span class="badge-arrow-num">{{this.total}}</span>）</span>
      <span class="header-more-title">
        <template >
            <router-link :to="'/exam/sign-up'"  class="link-type">
              <span>更多<i class="el-icon-arrow-right"></i></span>
            </router-link>
          </template>
      </span>
    </div>
    <div class="body">
      <el-table v-loading="loading" :data="examList" style="width: 100%;" :show-header="false">
        <template>
          <el-table-column prop="name" :show-overflow-tooltip="true"/>
          <el-table-column prop="userDeptName" :show-overflow-tooltip="true"/>
          <el-table-column width="180px" :show-overflow-tooltip="true">
            <template slot-scope="scope" >
              <span>{{ scope.row.examPlanDTO.examDate }}&nbsp;{{ scope.row.examPlanDTO.examStart }}~{{ scope.row.examPlanDTO.examEnd }}</span>
            </template>
          </el-table-column>
        </template>
      </el-table>
    </div>
  </el-card>
</template>

<script>
    import {getExamInfo} from "@/api/exam/signUp"
    export default {
      name: "ExamNotice",
      data() {
        return {
          // 遮罩层
          loading: true,
          // 人员考试信息列表
          examList: [],
          // 考试信息总数
          total: 0,
        }
      },
      created() {
        //初始化考试列表
        this.initList();
      },
      methods: {
        initList() {
          this.loading = true;
          getExamInfo().then(response => {
            this.examList = response.responseBody;
            this.total = response.responseBody.length;
            this.loading = false;
          });
        },
      }
    }
</script>

<style scoped>

</style>
